import $ajax from './config'
/*忘记密码查询账号*/
export const veriAccount = data => $ajax.post('/login/VeriAccount', data)
/*忘记密码发送验证码*/
export const verifiphone = data => $ajax.post('/Person/Verifiphone', data)
/*忘记密码验证邮箱*/
export const verificode = data => $ajax.post('/login/Verificode', data)
/*忘记密码修改密码*/
export const forgetPassword = data => $ajax.post('/login/forgetPassword', data)
/* 登陆 */
export const login = data => $ajax.post('login/', data)
/*绑定邮箱*/
export const addemail = data => $ajax.post('/Person/addmil', data)
/*获取验证码*/
export const getEmailCode = data => $ajax.post('/Person/getCode', data)
/*设置修改密码*/
export const changePassworld = data => $ajax.put('/Person/UpdatePassword', data)
/* 获取评价筛选条件 */
export const findEvalate = data => $ajax.post('/lattice/findEvalate', data)
// 获取所有评价筛选条件
export const findEvalates = data => $ajax.post('/lattice/findEvalates', data)
/*  获取评价列表 */
export const getEvalateList = data => $ajax.post('Evluate/findEvaluateForLatticeid', data)

/*获取单个网点全部窗口信息 */
export const windowMessage = data =>$ajax.post('/Window/findWindowBussiness',data)

// 删除某个网点窗口信息
export const windowMessageDelete = data => $ajax.post('/Window/updateWindowequipVailwid',data)
//添加某个网点窗口信息
export const windowMessageAdd = data => $ajax.post('/Window/insertWindowone',data)
//查看某个网点窗口信息
export const windowMessageChech = data => $ajax.post('/Window/findWindowone',data)
// 编辑网点窗口信息
export const windowMessageEdit = data => $ajax.put("/Window/updatewindow",data)
//窗口设备信息
export const windowShebeiMess = data => $ajax.post("/Window/findWindows",data)
//窗口设备解绑
export const windowEquipmentBinding = data => $ajax.post("/Window/updateWinEquipvail",data)
//窗口业务类型解绑
export const windowBusinessBunding = data => $ajax.post('/Window/updateBusinessWindow',data)

//首次登录预约规则
export const makeIndex = data => $ajax.post('/appoRules/firstAppoRules',data)
//预约规则查询
export const makeSearch = data => $ajax.post('/appoRules/appoRulesSearch',data)
//取号规则编辑
export const makeNumEit = data => $ajax.post('/appoRules/takeNumberSet',data)
//取号编辑提交
export const subMakeNum = data => $ajax.put('/appoRules/takeNumberSet',data)
//爽约规则编辑
export const breakEidt = data => $ajax.post('/appoRules/breakSet',data)
//爽约规则提交
export const breakSub = data => $ajax.put('/appoRules/breakSet',data)
//预约日期设置
export const makeDateTime = data => $ajax.post("/appoRules/workDateSet",data)
//预约日期提交
export const subMakeDate = data => $ajax.put("/appoRules/workDateSet",data)
//预约时间段编辑
export const makeDateTimeSet = data => $ajax.post("/appoRules/appoTimeSet",data)
//预约时间段提交
export const makeDateTimeSub = data => $ajax.put('/appoRules/appoTimeSet',data)
//查看现行日期规则
export const nowMakeDates = data => $ajax.post('/appoRules/currentWorkDateRule',data)
//查看现行时间规则
export const nowMakeTimes = data => $ajax.post('/appoRules/currentAppoTimeRule',data)
//首次进入预约规则自检
export const myselfCheck = data => $ajax.post('/appoRules/selfTestLatticeConfig',data)
//通过工作日期获取节假日 
export const getHiliday = data => $ajax.post('/appoRules/getHolidayByWorkDate',data)

/*  评价查询 */
export const  searchEvaluate = data => $ajax.post('/Evluate/findEvaluateForLatticeid', data)
/*  获取列表数据总数、总页数 */
export const getEvaluateCounts = data => $ajax.post('/Evluate/findEvaluateCounts', data)
/*  评价详情 */
export const evalateDetail = data => $ajax.post('/Evluate/findEvaluteforid', data)
/*  预约须知 */
export const notes = data => $ajax.post('/appintRule/findrulefromid', data)
/*  预约须知修改 */
export const editNotes = data => $ajax.post('/appintRule/updateRuleNotes', data)
/*  预约须知删除 */
export const deleteNotes = data => $ajax.post('/appintRule/updateRuleVail', data)
/*  新建预约须知 */
export const addNotes = data => $ajax.post('/appintRule/insertRule', data)
/* 首页 */
export const getHomeData = data => $ajax.post('/statistics/latticeHome', data)
/* 获取所有设备信息 */
export const getAllFacility = data => $ajax.post('/Windowequip/findWindowequips', data)
/* 获取单个设备详情信息 */
export const getFacilityDetail = data => $ajax.post('/Windowequip/findWindowequip', data)
/* 新建设备 */
export const addFacility = data => $ajax.post('/Windowequip/insertWindowequips', data)
/* 修改设备 */
export const editFacility = data => $ajax.post('/Windowequip/updateWindowequip', data)
/* 删除设备 */
export const deleteFacility = data => $ajax.post('/Windowequip/updateWindowequipVail', data)
/* 设备监控 */
export const monitor = data => $ajax.post('/Windowequip/findEquipmentStatus', data)
/* 预约记录列表 */
export const getRecordList = data => $ajax.post('/appoRecord/searchAppo', data)
/* 预约记录时间段 */
export const getRecordTimeRange = data => $ajax.post('/appoRecord/searchAppoTimes', data)
/* 预约记录详情 */
export const getRecordDetail = data => $ajax.post('/appoRecord/searchAppoById', data)
/* 预约记录编辑详情 */
export const getRecordEditInfo = data => $ajax.post('/appoRecord/editorAppoInfo', data)
/* 预约记录网点业务类型 */
export const getRecordBusinessType = data => $ajax.post('/appoRecord/searchBusinessTypes', data)
/* 预约记录修改 */
export const getRecordEdit = data => $ajax.post('/appoRecord/updateAppoInfo', data)
/* 网点全部业务类型 */
export const allBusiness = data => $ajax.post('/BusinessType/findBusinesstype', data)
/* 添加业务类型 */
export const addBusiness = data => $ajax.post('/BusinessType/insertBusiness', data)
/* 删除业务类型 */
export const deleteBusiness = data => $ajax.post('/BusinessType/updateBusiVail', data)
/* 业务类型详情 */
export const businessDetail = data => $ajax.post('/BusinessType/findBusiFormid', data)
/* 编辑业务类型 */
export const editBusinessType = data => $ajax.post('/BusinessType/updateBusiValue', data)
/* 网点使用机构业务类型 */
export const reuseBusinessType = data => $ajax.post('/BusinessType/insertBusinessFromOrgan', data)

/* 获取网点 */
export const getLattice = data => $ajax.post('/Person/getLattice', data)
/* 设置网点 */
export const setLattice = data => $ajax.post('/Person/setLattice', data)
/* 获取个人资料 */
export const getUserInfo = data => $ajax.post('/Person/getUser', data)
/* 修改个人资料 */
export const editUserInfo = data => $ajax.post('/Person/updateUser', data)
/* 修改密码 */
export const editPassWord = data => $ajax.post('/Person/updatePassword', data)
/*更改邮箱*/
export const updateMail = data => $ajax.post('/Person/updateMail', data)
/* 网点统计分析-预约统计*/
export const appoint = data => $ajax.post('/statistics/appoint', data)
/* 网点统计分析-预约业务统计*/
export const appointBusiness = data => $ajax.post('/statistics/appointBusiness', data)
/* 网点统计分析-业务办理占比*/
export const businessProp = data => $ajax.post('/statistics/business', data)
/* 网点统计分析-用户评价统计*/
export const comment = data => $ajax.post('/statistics/comment', data)

//
//机构数据接口

//机构首页
export const orgIndex = data => $ajax.post('/statistics/organHome',data)

/*机构业务类型*/
export const orgAllBusiness = data => $ajax.post('/findBusinesstype', data)
/*删除机构业务类型*/
export const orgDelBusiness = data => $ajax.post('/updateBusiVail', data)
/*新建机构业务类型*/
export const orgAddBusiness = data => $ajax.post('/insertBusiness', data)
/*机构业务类型详情*/
export const orgDetailBusiness = data => $ajax.post('/findBusiFormid', data)
/*机构业务类型修改*/
export const orgEditBusiness = data => $ajax.post('/updateBusiValue', data)
/*机构预约须知修改*/
export const orgEditNotes = data => $ajax.post('/updateRuleNotes', data)
/*机构预约须知新建*/
export const orgAddNotes = data => $ajax.post('/insertRule', data)
/*机构预约须知详情*/
export const orgNotes = data => $ajax.post('/findrulefromid', data)
/* 机构网点监控 */
export const orgMonitor = data => $ajax.post('/lattice/organEquitmentMonitor', data)

//人员管理

// 机构下管理员
export const orgManager = data => $ajax.post('/user/findPersonList',data)
//机构下单个管理员
export const orgManagerDetail = data => $ajax.post('/user/findPerson',data)
//机构修改管理员信息
export const orgManagerEdit = data => $ajax.post('/user/updatePerson',data)
//机构编辑人员管理
export const orgManagerAdd = data => $ajax.post('/user/insertPerson',data)
//机构删除人员管理
export const orgManagerDelete = data => $ajax.post('/user/deletePerson',data)


//预约规则

// 机构预约规则查询
export const orgMakeSearch = data => $ajax.post('/appoRulesSearch',data)
//机构预约规则日期编辑
export const orgMakeDateEdit = data =>$ajax.post('/editorAppoDate',data)
//机构预约规则日期提交
export const orgMakeDataSub = data =>$ajax.post('/updateOrganWorkDate',data)
//机构预约时间段编辑
export const orgMakeTimeEdit = data =>$ajax.post('/editorAppoTime',data)
//机构预约时间段修改
export const orgMakeTimeSub = data =>$ajax.post('/updateOrganAppoTime',data)
//机构取号规则或者爽约规则编辑
export const orgMakeTakeNumber = data => $ajax.post('/editorTakeNumAndBreakSet',data)
//机构爽约取号提交
export const orgMakeTakeSub = data =>$ajax.post('/updateTakeNumAndBreakSet',data)
//机构预约规则第一次设置
export const orgMakeFirst = data => $ajax.post('/newOrganBookingRule',data)



/*机构预约须知删除*/
export const orgDelNotes = data => $ajax.post('/updateRuleVail', data)
/*机构网点管理*/
export const orgWebsite = data => $ajax.post('/lattice/findLatticeFormOrganid', data)
/*机构网点新建*/
export const orgWebsiteAdd = data => $ajax.post('/lattice/insertLattice', data)
/*机构网点编辑之前*/
export const orgWebsiteEditBefore = data => $ajax.post('/lattice/findLattice', data)
/*机构网点详情*/
export const orgWebsiteDetail = data => $ajax.post('/lattice/findLatticeFormId', data)
/*机构下网点管理员*/
export const orgPerson = data => $ajax.post('/lattice/findOrganLattice', data)
/*机构下网点删除*/
export const orgWebsiteDel = data => $ajax.post('/lattice/deleteOrganLattice', data)
/*机构网点编辑提交*/
export const orgWebsiteEditEnter = data => $ajax.post('/lattice/updateLattice', data)

/*机构评价列表*/
export const orgEvaluate = data => $ajax.post('/findEvaluateForOrganid', data)
/*机构评价筛选条件*/
export const orgEvaluateSearch = data => $ajax.post('/findOrganEvalute', data)
/*机构评价详情*/
export const orgEvaluateDetail = data => $ajax.post('/findEvaluteforid', data)

/* 机构统计分析-预约统计*/
export const orgAppoint = data => $ajax.post('/statistics/organAppoint', data)
/* 机构统计分析-预约业务统计*/
export const orgAppointBusiness = data => $ajax.post('/statistics/organAppointBusiness', data)
/* 机构统计分析-业务办理占比*/
export const orgBusinessProp = data => $ajax.post('/statistics/organBusiness', data)
/* 机构统计分析-用户评价统计*/
export const orgComment = data => $ajax.post('/statistics/organComment', data)

/* 年月日联动 */
export const years = data => $ajax.post('/statistics/getDayByMonth', data)
